import React from 'react';
import './index.css';

// 热点页面左边的图标
export default class HotRightInfo extends React.Component{
    constructor(props){
        super();
        this.state={
            type:props.type,
            src:props.src,
            text:props.text,
            subtext:props.subtext,
            time:props.time
        }
    }

    render(){
        return(
            <div className="HotRightInfo_Body">
                <div className="HotRightInfo_Left">
                    <img src={this.state.src} alt="hot"/>
                </div>
                <div className="HotRightInfo_Right">
                    <div className="HotRightInfo_Right_Top">
                        <div className="HotRightInfo_R_Title">
                            {this.state.text}
                        </div>
                        <div className="HotRightInfo_R_Icon" style={{display:this.state.type==="1"?"inline-block":"none"}}>
                            HOT
                        </div>
                    </div>
                    <div className="HotRightInfo_Right_Middle"  dangerouslySetInnerHTML={{__html: this.state.subtext}}>
                        {/* {this.state.subtext} */}
                    </div>
                    <div className="HotRightInfo_Right_Bottom">
                        <div className="HotRightInfo_R_B_I">
                            <img src="/assets/Hot/time.png" alt="hot"/>
                        </div>
                        <div className="HotRightInfo_R_B_t">
                            {this.state.time}
                        </div>
                    </div>
                </div>
            </div>
        )
    }
}